﻿using coreapi.Models.TempModels;
using LinCms.Core.Entities;
using Microsoft.AspNetCore.Cors;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using SqlSugar;
using System.Drawing.Printing;
using System.Xml.Linq;

namespace coreapi.Controllers
{
    [Route("api/[controller]")]
    [ApiController]
    [EnableCors("any")]
    [ApiExplorerSettings(GroupName = "v6")]
    public class DrinkInfoController : ControllerBase
    {
        private readonly ISqlSugarClient db;
        public DrinkInfoController(ISqlSugarClient _db)
        {
            this.db = _db;
        }
        /// <summary>
        ///  业绩
        /// </summary>
        /// <param name="empid"></param>
        /// <returns></returns>
        [HttpGet]
        public object Get(int empid) {
            var list = db.Queryable<SalesTotal>().Where(s => s.EmployeeID == empid).ToList();
            return list;
        }
    }
}
